{% extends "base.html" %}
{% block title %}为食不晚{% endblock %}
{% block head %}{% endblock %}
{% block script %}
<script type="text/javascript">
	
</script>
{% endblock %}
{% block content %}
		  
 	{% if  restaurant_list %}
 		<ul id="restaurant_list">
		{% for r in restaurant_list %}
			<li class="restaurant_list_item">
				<table><tr>
					<td class="left">
						<div id="star_{{r.id}}" onclick="star_clicked({{r.id}});" 
							{% if r.loved_by_current %}
							class="star star_on"
							{% else %}
							class="star star_off"
							{% endif %}	
						>&nbsp
						</div>
						<a class="restaurant_name">{{r.name}}</a>
					<p>
						<a class="restaurant_addr">{{r.address}}</a>
					</p>
					<p>
						<a class="restaurant_desc">{{r.phone}}</a>
					</p>
					</td>
					<td class="right">
						<div id="status">
							{% if r.is_open %}
								<a>营业中</a>
							{% else %}
								<a>暂停营业</a>
							{% endif %}
						</div>
						<div id="link">
							<input class="secondary-b-2" type="button" value="进入"/>
							<a href="/restaurant/{{r.id}}/">进入</a>
						</div>
					</td>
				</tr></table>
			</li>
			<div class="left-separator"></div>
		{% endfor %}
		</ul>
	{% else %}
		<p>There's no restaurant now!</p>
	{% endif %}
{% endblock %}